package com.rao.gmall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rao.gmall.model.product.SpuImage;
import com.rao.gmall.product.mapper.SpuImageMapper;
import com.rao.gmall.product.service.SpuImageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author nzmxfan
 * @create 2021-08-06-0:33
 */
@Service
public class SpuImageServiceImpl extends ServiceImpl<SpuImageMapper, SpuImage> implements SpuImageService {

    @Resource
    SpuImageMapper spuImageMapper;

    @Override
    public List<SpuImage> spuImageList(Long spuId) {

        QueryWrapper<SpuImage> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("spu_id", spuId);
        return spuImageMapper.selectList(queryWrapper);
    }
}
